package com.itheima.feign;


import com.itheima.cart.pojo.ShoppingCart;
import com.itheima.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "sky-cart")
public interface ShoppingCartClient {

    @GetMapping("/user/shoppingCart")
    public Result<List<ShoppingCart>>  getByDishIdOrSetmealIdWithUserId(@RequestBody ShoppingCart shoppingCart);

    @PostMapping("/user/shoppingCart/addCart")
    public Result add(@RequestBody ShoppingCart shoppingCart);

    @DeleteMapping("/user/shoppingCart/{userId}")
    public void clean(@PathVariable Long userId);
}
